package com.xmut.mall.store.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.*;

@Data
public class StoreCompanyDTO {
//公司基本信息

    @Size(min = 2, max = 100)
    @NotBlank(message = "公司名称不能为空")
    private String companyName;

    private String companyAddressIdPath;

    private String companyAddressPath;

    @Size(min = 1, max = 200)
    @NotBlank(message = "公司地址不能为空")
    private String companyAddress;

    private String companyPhone;

    @Email
    private String companyEmail;

    @Min(1)
    private Integer employeeNum;

    @Min(1)
    private Double registeredCapital;

    @Length(min = 2, max = 20)
    @NotBlank(message = "联系人姓名为空")
    private String linkName;

    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
    private String linkPhone;

    //营业执照信息

    @Size(min = 18, max = 18)
    private String licenseNum;

    @Size(min = 1, max = 200)
    private String scope;

    @NotBlank(message = "营业执照电子版不能为空")
    private String licencePhoto;

    //法人信息

    @Size(min = 2, max = 20)
    @NotBlank(message = "法人姓名不能为空")
    private String legalName;

    @Size(min = 18, max = 18)
    @NotBlank(message = "法人身份证不能为空")
    private String legalId;

    @NotBlank(message = "法人身份证不能为空")
    private String legalPhoto;

    @NotNull
    private Long memberId; // 用户Id

    @NotNull
    private String memberName; // 用户名
}
